From 7e6c83faf172b4e4b803c1f9d8808e936fba99bb Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 11 Mar 2017 18:09:28 -0800 Subject: [PATCH] Remove build date from version This was done by rustc awhile ago anyway and the rustc build system isn't exporting it. --- src/cargo/lib.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index de2dc7288..736a9c04d 100755 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -64,8 +64,6 @@ pub struct CommitInfo { pub struct CfgInfo { // Information about the git repository we may have been built from. pub commit_info: Option, - // The date that the build was performed. - pub build_date: String, // The release channel we were built for. pub release_channel: String, } @@ -93,15 +91,9 @@ impl fmt::Display for VersionInfo { }; if let Some(ref cfg) = self.cfg_info { - match cfg.commit_info { - Some(ref ci) => { - write!(f, " ({} {})", - ci.short_commit_hash, ci.commit_date)?; - }, - None => { - write!(f, " (built {})", - cfg.build_date)?; - } + if let Some(ref ci) = cfg.commit_info { + write!(f, " ({} {})", + ci.short_commit_hash, ci.commit_date)?; } }; Ok(()) @@ -260,7 +252,6 @@ pub fn version() -> VersionInfo { patch: env_str!("CARGO_PKG_VERSION_PATCH"), pre_release: option_env_str!("CARGO_PKG_VERSION_PRE"), cfg_info: Some(CfgInfo { - build_date: option_env_str!("CFG_BUILD_DATE").unwrap(), release_channel: option_env_str!("CFG_RELEASE_CHANNEL").unwrap(), commit_info: commit_info, }), -- 2.30.2